package com.Dao;

import com.entity.Book;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BookDao {
    List<Book> findAllBook(Book book);

    //新增数据
    public int saveBook(Book book);

    //删除数据
    public int deleteBook(int id);

    //根据id查找
    public Book getBook(int id);

    //更新数据
    public void updateBook(Book book);

    //根据账号查找
    public Book selectBookById(int id);

    //根据书名查找
    public Book selectBookByTitle(String title);


    public Book selectBookByAuthor(String author);

    //新增用户
    public int insertBook(Book book);
}
